import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import installElementPlus from './plugins/element'
import './style/index.scss'
import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css';
import configa from './config';
import { ElMessage, ElMessageBox } from 'element-plus'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import locale from 'element-plus/lib/locale/lang/zh-cn';
import axios from 'axios'
// 导入px->rem
import './plugins/rem'
axios.defaults.withCredentials=true;//让ajax携带cookie



const app = createApp(App)
app.config.globalProperties.$msg = ElMessage
app.config.globalProperties.$msgBox = ElMessageBox
app.use(ElementPlus,{locale})
configa.CustomPlug.forEach((v) => app.config.globalProperties[v.n] = v.v);
configa.CustomPlug.forEach((item)=>{
    app.config.globalProperties[item.n] = item.v
})
app.component('QuillEditor', QuillEditor)
installElementPlus(app)
app.use(store).use(router).mount('#app')